package dc;

import java.util.List;

public class HistoryData {

	private List<Outcome> ho;
	private int[] bonusMultipe = new int[] { 0, 0, 0, 0, 0, 0, 0 };
	private int totalMultipe = 0;

	public List<Outcome> getHo() {
		return ho;
	}

	public void setHo(List<Outcome> ho) {
		this.ho = ho;
	}

	public int[] getBonusMultipe() {
		return bonusMultipe;
	}

	public void setBonusMultipe(int[] bonusMultipe) {
		this.bonusMultipe = bonusMultipe;
	}

	public int getTotalMultipe() {
		return totalMultipe;
	}

	public void setTotalMultipe(int totalMultipe) {
		this.totalMultipe = totalMultipe;
	}

	public String sumary() {
		bonusMultipe = new int[] { 0, 0, 0, 0, 0, 0, 0 };
		totalMultipe = 0;
		StringBuffer sb = new StringBuffer();
		if (ho != null && ho.size() > 0) {
			for (Outcome oc : ho) {
				sb.append(oc.sumary()).append("\r\n");

				totalMultipe += oc.getTotalMultipe();
				bonusMultipe[0] += oc.getBonusMultipe()[0];
				bonusMultipe[1] += oc.getBonusMultipe()[1];
				bonusMultipe[2] += oc.getBonusMultipe()[2];
				bonusMultipe[3] += oc.getBonusMultipe()[3];
				bonusMultipe[4] += oc.getBonusMultipe()[4];
				bonusMultipe[5] += oc.getBonusMultipe()[5];
				bonusMultipe[6] += oc.getBonusMultipe()[6];
			}
		}

		sb.append("--------------------------------------------------\r\n");
		sb.append("总计:").append(totalMultipe).append("\r\n");
		sb.append("1:").append(bonusMultipe[1]).append("\r\n");
		sb.append("2:").append(bonusMultipe[2]).append("\r\n");
		sb.append("3:").append(bonusMultipe[3]).append("\r\n");
		sb.append("4:").append(bonusMultipe[4]).append("\r\n");
		sb.append("5:").append(bonusMultipe[5]).append("\r\n");
		sb.append("6:").append(bonusMultipe[6]).append("\r\n");
		return sb.toString();
	}

}
